<template>
  <!-- 咨询详情 -->
  <div>
    <TopNav>
      <div class="div-top">详情</div>
    </TopNav>
    <div class="main" v-for="e in menuNav" :key="e.id">
      <div class="box" v-if="e.id == $route.query.id">
        <p class="pag">{{ e.site }}</p>
        <span class="time">{{ e.time }}</span>
        <p class="pag-1">{{ e.content }}</p>
        <img class="photo" :src="e.img2" alt="" />
        <p class="pag-2">{{ e.content1 }}</p>
        <img class="photo-1" :src="e.img" alt="" />
        <div class="fenxiang">
          <span>分享至</span>
          <img src="../assets/weixin@2x.png" alt="" />
          <img src="../assets/pengyouquan@2x.png" alt="" />
        </div>
        <div class="qwe"></div>
      </div>
    </div>
    <div class="motaikuang"></div>
  </div>
</template>
<script>
import { getTravelnews } from '@/api/travel';

export default {
  data() {
    return {
      menuNav: [],
    };
  },
  created() {
    this.getTravelnews();
  },
  methods: {
    async getTravelnews() {
      const { data } = await getTravelnews();
      this.menuNav = data;
    },
  },
};
</script>
<style lang="scss" scoped>
.main{
  display: flex;
  width: 375px;
  justify-content: center;
}
.box {
  width: 345px;
  .pag {
    font-size: 24px;
    color: #333333;
  }

  .time {
    font-size: 12px;
    color: #9da3b4;
  }

  .pag-1 {
    font-size: 17px;
    color: #333333;
    letter-spacing: 0;
    line-height: 28px;
    text-indent: 2em;
  }

  .photo {
    width: 345px;
    height: 194px;
  }

  .pag-2 {
    font-size: 17px;
    color: #000000;
    text-align: left;
    line-height: 28px;
    text-indent: 2em;
  }

  .photo-1 {
    width: 355px;
    height: 300px;
  }

  .fenxiang {
    margin-top: 30px;
    width: 200px;
    justify-content: space-between;
    display: flex;

    span {
      font-size: 18px;
      color: #5b5b5b;
    }

    img {
      width: 30px;
      height: 30px;
    }
  }

  .qwe {
    height: 30px;
  }
}

.div-top {
  font-size: 17px;
  color: #333333;
  letter-spacing: 0;
  text-align: center;
  line-height: 44px;
}

.qwe {
  width: 375px;
  height: 100px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-bottom: 1px solid #ececec;

  .img2 {
    width: 115px;
    height: 75px;
  }

  .qwe-1 {
    width: 230px;
    height: 75px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    div {
      font-size: 17px;
      color: #333333;
    }

    span {
      font-size: 12px;
      color: #9da3b4;
    }
  }
}
</style>
